<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>上传文件首页</title>
    <%@ include file="/WEB-INF/commons/header.jsp" %>
</head>
<body>


<div class="layui-layout layui-layout-admin">
    <%@ include file="/WEB-INF/commons/navbar.jsp" %>
    <%@ include file="/WEB-INF/commons/menu.jsp" %>

    <div class="layui-body" style="background-color: #F6F6F6">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">

            <h2 style="font-weight: bold" align="center">${news.newsTitle}</h2><br>
            <h3 align="center">发布时间:&nbsp; ${news.createTime}</h3><br>
            <h3 align="center">作者:&nbsp; ${news.newsAuthor}</h3><br><br>

            <p>
            <div id="test-editormd-view">
                <textarea id="append-test" style="display:none;"> ${news.newsArticle}</textarea>
            </div>
            </p>


            <br>
        </div>
    </div>
</div>

<script src="${ctx}/static/layui/layui.js"></script>
<!--editormd-->
<script src="${ctx}/editormd/jquery-3.3.1.min.js"></script>
<!--editormd-->
<script src="${ctx}/editormd/lib/marked.min.js" ></script>
<script src="${ctx}/editormd/lib/prettify.min.js" ></script>
<script src="${ctx}/editormd/lib/raphael.min.js"></script>
<script src="${ctx}/editormd/lib/underscore.min.js" ></script>
<script src="${ctx}/editormd/lib/sequence-diagram.min.js" ></script>
<script src="${ctx}/editormd/lib/flowchart.min.js" ></script>
<script src="${ctx}/editormd/lib/jquery.flowchart.min.js" ></script>
<script src="${ctx}/editormd/editormd.js"></script>
<script type="text/javascript">
    /*editormd*/
    $(function () {
        editormd.markdownToHTML("test-editormd-view", {
            htmlDecode      : "style,script,iframe",  // you can filter tags decode
            emoji           : true,
            taskList        : true,
            tex             : true,  // 默认不解析
            flowChart       : true,  // 默认不解析
            sequenceDiagram : true,  // 默认不解析
        });
    })
</script>

</body>
</html>
